
library(foreign)

# ======================================================================================
# =                        Figure 6                                                    =
# ======================================================================================

dat <- read.csv("figure6_data.csv")

coef <- dat[,3]
se <- dat[,4]

u.coef <- dat[1:6,3]
u.se <- dat[1:6,4]
p.coef <- dat[7:12,3]
p.se <- dat[7:12,4]

var.names <- c("AU, NZ", "DE-E, SE", "US, DE-W", "GB, IE, NO", "CH", "CA, FR")


postscript(file="Figure6.eps", pointsize=10, width=6, height=2.4,	
	horizontal = FALSE, onefile = FALSE, paper = "special")

y.axis <- length(var.names):1

layout(matrix(c(2,1,3),1,3),widths=c(1.5,4,4))
par(mar=c(3, .6, 4.4, 1))
plot(u.coef, y.axis, type="n",axes=F, xlab = "", ylab = "", pch = 19, cex = 1.3,
      xlim = c(-3,3), ylim = c(min(y.axis-.2), max(y.axis+.1)),
     	main="Unemployment",cex.main=1.4)
axis(1,at=seq(-3,3),cex.axis = 1.2)
axis(2, at = y.axis, label = var.names, las = 1, tick = T, cex.axis =1.2)
abline(h=y.axis,lty=2,col="grey")
abline(v=0,col="red")
points(u.coef,y.axis, pch = 19, cex = 1.5, col = "black")
segments(u.se*-1.96+u.coef,y.axis,u.se*+1.96+u.coef,y.axis , lwd=2, col = "black")
text(u.coef[1]+.66,6 ,expression(delta[21]^(1)),cex=1.2)
text(u.coef[2]+.56,5 ,expression(delta[22]^(1)),cex=1.2)
text(u.coef[3]+.66,4 ,expression(delta[23]^(1)),cex=1.2)
text(u.coef[4]+.54,3 ,expression(delta[24]^(1)),cex=1.2)
text(u.coef[5]+.61,2 ,expression(delta[25]^(1)),cex=1.2)
text(u.coef[6]+.56,1 ,expression(delta[26]^(1)),cex=1.2)
empty=1
plot(empty,type="n",axes=F,xlab="",ylab="")

plot(p.coef, y.axis, type="n",axes=F, xlab = "", ylab = "", pch = 19, cex = 1.3,
      xlim = c(-3,3), ylim = c(min(y.axis-.2), max(y.axis+.1)),
     	main="Pensions",cex.main=1.4)
axis(1,at=seq(-3,3),cex.axis = 1.1)
abline(v=0,col="red")
abline(h=y.axis,lty=2,col="grey")
points(p.coef,y.axis, pch = 19, cex = 1.5, col = "black")
segments(p.se*-1.96+p.coef,y.axis,p.se*+1.96+p.coef,y.axis, lwd=2, col = "black")

text(p.coef[1]+.69,6 ,expression(delta[31]^(1)),cex=1.2)
text(p.coef[2]+.59,5 ,expression(delta[32]^(1)),cex=1.2)
text(p.coef[3]+.69,4 ,expression(delta[33]^(1)),cex=1.2)
text(p.coef[4]+.59,3 ,expression(delta[34]^(1)),cex=1.2)
text(p.coef[5]+.63,2 ,expression(delta[35]^(1)),cex=1.2)
text(p.coef[6]+.61,1 ,expression(delta[36]^(1)),cex=1.2)

dev.off()


